import java.util.Arrays;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 04 - 17
 * Time: 22:06
 */
//实现一个方法 transform, 以数组为参数, 循环将数组中的每个元素 乘以 2 , 并设置到对应的数组元素上
public class test1 {
    public static void transform(int[] arr1) {
        for (int i = 0; i < arr1.length; i++) {
            arr1[i] = arr1[i] * 2;
        }
    }
    public static void main(String[] args) {
        int[] arr1= {10, 7, 3, 4};
        transform(arr1);
        System.out.println(Arrays.toString(arr1));
    }
}
